<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Keywords" content="惠信钱包，金融">
<meta name="description" content="描述描述描述" />
<%@include file="/WEB-INF/base/commRoot.jsp"%>
<script type="text/javascript" src="/js/jquery.js"></script> 
<script type="text/javascript" src="/js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="/js/rsa/RSA.js"></script> 
<script type="text/javascript" src="/js/rsa/BigInt.js"></script> 
<script type="text/javascript" src="/js/rsa/Barrett.js"></script> 
<script type="text/javascript" src="/js/rsa/RsaDataUtil.js"></script> 
<script type="text/javascript" src="/js/view/static/static.js"></script>
<script type="text/javascript" src="/js/view/user/login.js"></script>
<title>重置密码</title>
<script type="text/javascript">
$(function() {
	//获取登录错误信息
	var errormsg='${errorMsg}';
	var rightmsg='${rightMsg}';
	if(errormsg!=""){
		alert(errormsg);
	}
	if(rightmsg!=""){
		$("#divAlert").show();
		$("#divBackground").show();
		clock();
	}
});

var time = 3;
function clock(){
	time--;
	if(time==0){
		window.location.href=ctx_root+"/login.jsp";
	    }
	setInterval("clock();",1000);
}



$(function(){
	  $(document).keydown(function(event){
	    if(event.keyCode==13){
	    	reset();
	    }
});
});

	/*提交登录数据*/
	function reset() {
		if(testPassword()&&testPassword02()){
			var pwd = $("#pwd").val();
			var verifyNewPwd =$("#verifyNewPwd").val();
			$("#rsaPwd").val(rsaData(pwd));
			$("#rsaPayPwd").val(rsaData(verifyNewPwd));
		$('#resetForm').submit();
	}
}
</script>
</head>
<body>
  <input id="module" type="hidden" value="<s:property value='#application.module'/>">
<input id="empoent" type="hidden" value="<s:property value='#application.empoent'/>">
	<!--header-->
	<%@include file="/head.jsp"%>
	<!--/header-->
	<!--main-->
	<div class="main_bg">
		<div class="regist">
			<h3 class="find_pwd_tit">找回密码</h3>
			<form action="${root}/userAction_resetPwd.action" id="resetForm" name="resetForm" method="post">
				<ul>
					<li class="clearfix"><label>新密码：</label>
						<div class="position">
							<input autocomplete="off" type="password" id="pwd"  class="input" maxlength="16" onpaste="return false" onkeyup="testPassword();" />
							<input id="rsaPwd" name="rsaPwd" type="hidden"/>
						</div>
						 <p class="suc_tips" id="pwdRight" style="display:none;"></p>
               			 <p class="err_tips" id="pwdMsg" style="display:none;"></p>
					</li>
					<li class="clearfix"><label>确认密码：</label>
						<div class="position">
							<input autocomplete="off" type="password" id="verifyNewPwd"  class="input" maxlength="16" onpaste="return false" onkeyup="testPassword02();" />
							<input id="rsaPayPwd" name="rsaPayPwd" type="hidden"/>
						</div>
						<p id="verifyNewPwdMsg" class="err_tips" style="display:none;"></p>
						<p id="verifyNewPwdRight" class="suc_tips" style="display:none;"></p>
					</li>
					<li class="clearfix"><a href="javascript:reset();"
						class="mar_li btn l">完成</a></li>
				</ul>
			</form>
		</div>
	</div>
	
	
<div class="popup" style=" width:380px; margin-left:-190px; top:25%; display:none;" id="divAlert" >
  <div class="pop_reset"><p><span class="bi">重置密码成功</span><br/><span style="color:#888;">两秒后自动跳转到登录页面</span></p></div>
</div>
<div class="pop_up_bg" id="divBackground" style="display:none;"></div>
	
	
	<!--/main-->
	<!--footer-->
	<%@include file="/footer.jsp"%>
</body>

<script type="text/javascript">
<s:if test="dataMap.checkCodeErrorMsg != null && dataMap.checkCodeErrorMsg !='' ">
	$("#pwdMsg").show();
	$("#pwdMsg").text("<s:property value="dataMap.checkCodeErrorMsg"/>");
</s:if>

<s:if test="dataMap.verifyNewPwdErrorMsg != null && dataMap.verifyNewPwdErrorMsg !='' ">
	$("#verifyNewPwdMsg").show();
	$("#verifyNewPwdMsg").text("<s:property value="dataMap.verifyNewPwdErrorMsg"/>");
</s:if>
</script>

</html>
